var arr = [8, 94, 15, 88, 55, 76, 21, 39];

var out = arr.splice(4, 1, 6, 7); //[55]
console.log(out);


var fruitsaaa = ["Banana", "Orange", "Apple", "Mango"];
var out2 = fruitsaaa.splice(1, 2, "Lemon", "Kiwi");
console.log(out2)